import {
	requestNoAuth,
	request
} from '../../lib/java110/java110Request.js';
import url from '../../constant/url.js';

export function getIndexCategoryList(_dataObj) {
	return new Promise(
		(resolve, reject) => {
			let _data = [{
				name: "报事",
				src: "/static/images/mall_delicious.png",
				href: "/pages/roomFeeListNew/roomFeeListNew"
			}, {
				name: "活动",
				src: "/static/images/mall_domestic.png",
				href: "/pages/payParkingFeeList/payParkingFeeList"
			}, {
				name: "办事指南",
				src: "/static/images/mall_groupBuy.png",
				href: "/pages/complaint/complaint"
			}, {
				name: "党建",
				src: "/static/images/mall_market.png",
				href: "/pages/repair/repair"
			}, {
				name: "公告",
				src: "/static/images/mall_secKill.png",
				href: "/pages/notice/index"
			}];
			resolve(_data);
		})
		
}

export function queryProductLabel(_dataObj) {
	return new Promise(
		(resolve, reject) => {
			requestNoAuth({
				url: url.queryProductLabel,
				method: "GET",
				data: _dataObj,
				//动态数据
				success: function(res) {
					if (res.statusCode == 200) {
						let _data = res.data
						resolve(_data)
						return
					}
					reject()
				},
				fail: function(e) {
					reject()
				}
			})
		})
}

export function queryStoreMsg(_dataObj) {
	return new Promise(
		(resolve, reject) => {
			requestNoAuth({
				url: url.queryStoreMsg,
				method: "GET",
				data: _dataObj,
				//动态数据
				success: function(res) {
					if (res.statusCode == 200) {
						let _data = res.data
						resolve(_data)
						return
					}
					reject()
				},
				fail: function(e) {
					reject()
				}
			})
		})
}

export function queryStoreAds(_dataObj) {
	return new Promise(
		(resolve, reject) => {
			requestNoAuth({
				url: url.queryStoreAds,
				method: "GET",
				data: _dataObj,
				//动态数据
				success: function(res) {
					if (res.statusCode == 200) {
						let _data = res.data
						resolve(_data)
						return
					}
					reject()
				},
				fail: function(e) {
					reject()
				}
			})
		})
}
